Skip to content

Normalize instance lifecycle wiring#25501

Merged
kitlangton merged 5 commits intodevfrom
kit/instance-lifecycle-scope
May 3, 2026
Merged

Normalize instance lifecycle wiring#25501
kitlangton merged 5 commits intodevfrom
kit/instance-lifecycle-scope

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

@kitlangton kitlangton commented May 2, 2026

Summary

  • Move production instance-store/bootstrap wiring into an explicit instance layer instead of InstanceRuntime.layer.
  • Keep Instance as the ALS facade and route Promise callers through WithInstance.
  • Remove Instance.provide and LoadInput.init; worktree bootstrapping now uses InstanceStore.Service directly.
  • Make the legacy instance config route response-safe by scheduling disposal after the successful config response is constructed.

Verification

  • bun typecheck
  • bun run test test/project/instance.test.ts test/project/instance-bootstrap-regression.test.ts
  • bun run test test/project/worktree.test.ts test/project/worktree-remove.test.ts
  • bun run test test/server/httpapi-instance-context.test.ts
  • env -u OPENCODE_EXPERIMENTAL_WORKSPACES bun run test (one timeout in test/session/retry.test.ts; rerun passed)
  • bun run test test/session/retry.test.ts
  • git diff --check

@kitlangton kitlangton force-pushed the kit/instance-lifecycle-scope branch from 9cbb395 to a727c14 Compare May 3, 2026 00:34
@kitlangton kitlangton merged commit 7d91d3b into dev May 3, 2026
8 of 9 checks passed
@kitlangton kitlangton deleted the kit/instance-lifecycle-scope branch May 3, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant